// import React from 'react'

import { useNavigate } from 'react-router-dom'
import './ErrandOrder.css'

export default function ErrandOrder() {
    const navigate = useNavigate()
    const back = () => {
        navigate('/rider/my')
    }
    // 获取事件
    const now = new Date();

    const formattedTime = `${now.getFullYear()}-${(now.getMonth() + 1).toString().padStart(2, '0')}-${now.getDate().toString().padStart(2, '0')}`;
    
    return (
        <div className=''>
            <div className="rider-tip-title">
                <button onClick={back}>返回</button>
                <h3>跑腿订单</h3>
            </div>
            <div className='rider-order-bgcolor'>
                <div className='rider-order-time'>
                    {formattedTime }
                </div>
                <div className='rider-order-item'>
                    <div className='rider-order-money'>
                        <span className='order-money-one'>配送费:￥2</span>
                        <span>2024-02-31 10:10:10</span>
                    </div>
                     {/* 分割线 */}
                     <div className='item-title-border'></div>
                    <div className='rider-order-starting'>
                        <span className=''>
                            <div className='rider-order-starting-top'>吉阿婆玛拉顿</div>
                            <div className='rider-order-starting-bottom'>梨园5楼9号床</div>
                        </span>
                        <span className='rider-order-starting-top'>
                            520m
                        </span>
                    </div>
                    <div className='rider-order-end'>
                        <span className=''>
                            <div className='rider-order-starting-top'>老八快乐屋</div>
                            <div className='rider-order-starting-bottom'>备注：嗨害嗨</div>
                        </span>
                        <span className='rider-order-starting-top'>
                            114514m
                        </span>
                    </div>

                </div>
            </div>

        </div>
    )
}
